//声明: 该文件需要 swiper,jqueryui,common,toast,jquery

require(["config"], function(config) {
	require(["jquery.ui", "com", "jquery", "zepto", "sw", "toast"], function(jqui, com, jq, zep, sw, t) {
		/*jq("#mydialog").dialog({
			buttons : {
				"确定" : function(){
					console.log("你点击了确定");
					$("#mydialog").dialog("close");
				},
				"取消" : function(){
					console.log("你点击了取消");
				}
			}
		});*/

		jq("#search").autocomplete({
			source: function(request, response) {
				$.ajax({
					url: "http://suggestion.baidu.com/su",
					dataType: "jsonp",
					data: {
						wd : request.term
					},
					jsonp: "cb",
					success: function(data) {
						response(data.s);
					}
				});
			},
			select : function(event, ui) {
				console.log(ui.item.label);
			}
		});

		//console.log(randomColor());

		console.log(document.body);

		new t("这是一个会自动消失的弹出框");
	});
})